package
{
	import flash.display.Shape;
	import flash.display.Sprite;
	public class Player extends Sprite
	{
		
		public var color:uint;
		public var shape:Shape;
		public var speed:Number;
		//-----------------------------------------------------------------------------------//		
		public function Player()
		{
			
			name = "";
			shape = new Shape();
						
			var ran:Number = Math.random();
			color = uint(16777215*ran);
			speed = ran;
			this.x = ran*400;
			
			//shape que se actualiza.
			
		
			this.addChild(shape);
			
		}
		public function Init():void
		{
			shape.graphics.lineStyle(1);
			shape.graphics.beginFill(color,1);
			shape.graphics.drawRect(0,0,25,25);
		}
		public function ResetProperties():void
		{
			
			shape.graphics.beginFill(color,1);
		
		}
		//-----------------------------------------------------------------------------------//
		public function Update():void
		{
			x+=speed;
			if (x > 400)
				x = 0;
		}
	}
}